if (self.CavalryLogger) { CavalryLogger.start_js(["CN5\/v"]); } __d("MessengerProfileLinkTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:MessengerProfileLinkLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:MessengerProfileLinkLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:MessengerProfileLinkLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setAction=function(a){this.$1.action=a;return this};c.setDomain=function(a){this.$1.domain=a;return this};c.setLinkLocation=function(a){this.$1.link_location=a;return this};c.setTargetID=function(a){this.$1.target_id=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setVC=function(a){this.$1.vc=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};return a}();c={action:!0,domain:!0,link_location:!0,target_id:!0,time:!0,vc:!0,weight:!0};e.exports=a}),null); __d("MessengerBootloadedLogMessage.react",["cx","BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("BootloadOnRender.react"),{component:b("React").createElement(b("LazyComponent.react"),this.props),loader:b("JSResource")("MessengerLogMessage.react").__setRef("MessengerBootloadedLogMessage.react"),placeholder:b("React").createElement("div",{className:"_497p"},"...")})};return c}(b("React").PureComponent);e.exports=a}),null); __d("MessengerProfileLinkAction",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({CLICK:"click",HOVER:"hover"})}),null); __d("MessengerProfileLinkDomain",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({MESSENGER_DOT_COM:"messenger_dot_com",FB_SLASH_MESSAGES:"fb_slash_messages",WORK_CHAT:"work_chat"})}),null); __d("MessengerProfileLinkLogger.bs",["MessengerProfileLinkTypedLogger"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e){new(b("MessengerProfileLinkTypedLogger"))().setTargetID(a).setDomain(c).setLinkLocation(d).setAction(e).log();return 0}f.logItemImpression=a}),null); __d("ProfileLinkReact.bs",["ReasonReact.bs","bs_js_null_undefined","ProfileLink.react"],(function(a,b,c,d,e,f){"use strict";function a(a,c,d,e,f,g,h,i){return b("ReasonReact.bs").wrapJsForReason(b("ProfileLink.react"),{className:b("bs_js_null_undefined").fromOption(a),href:b("bs_js_null_undefined").fromOption(c),onClick:b("bs_js_null_undefined").fromOption(d),onMouseEnter:b("bs_js_null_undefined").fromOption(e),onMouseLeave:b("bs_js_null_undefined").fromOption(f),target:b("bs_js_null_undefined").fromOption(g),uid:h},i)}f.make=a}),null); __d("MessengerProfileLink.bs",["cx","URI","bs_block","bs_curry","React","Arbiter","LinkReact.bs","BadgeReact.bs","CurrentUser","ReasonReact.bs","bs_js_primitive","ProfileLinkReact.bs","isMessengerDotComURI","MessengerProfileLinkAction","MessengerProfileLinkDomain","MessengerProfileLinkLogger.bs"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("ReasonReact.bs").reducerComponent("MessengerProfileLink");function i(a,c,d,e,f,g,i){__p&&__p();var j=b("isMessengerDotComURI")(new(b("URI"))(window.location.href));i=b("CurrentUser").isWorkUser();var k=i?b("MessengerProfileLinkDomain").WORK_CHAT:j?b("MessengerProfileLinkDomain").MESSENGER_DOT_COM:b("MessengerProfileLinkDomain").FB_SLASH_MESSAGES,l=function(){return b("MessengerProfileLinkLogger.bs").logItemImpression(f,k,d,b("MessengerProfileLinkAction").HOVER)},m=function(){return b("MessengerProfileLinkLogger.bs").logItemImpression(f,k,d,b("MessengerProfileLinkAction").CLICK)};return[h[0],h[1],h[2],h[3],function(a){var c=b("Arbiter").subscribe("Hovercard/show",function(c,d){return b("bs_curry")._1(a[3],0)}),d=b("Arbiter").subscribe("Hovercard/hide",function(c,d){return b("bs_curry")._1(a[3],1)});return b("bs_curry")._1(a[4],function(){c.unsubscribe();d.unsubscribe();return 0})},h[5],h[6],h[7],function(d){var h=b("React").createElement("span",void 0,e,g?b("ReasonReact.bs").element(void 0,void 0,b("BadgeReact.bs").make("medium","verified",[])):null);return b("React").createElement("span",{className:"_6ybk"},a!==void 0?j?b("ReasonReact.bs").element(void 0,void 0,b("LinkReact.bs").make(void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,a,void 0,function(){d[1][0]&&l(0);return m(0)},void 0,void 0,void 0,void 0,void 0,void 0,c,void 0,[h])):b("ReasonReact.bs").element(void 0,void 0,b("ProfileLinkReact.bs").make(void 0,void 0,function(){return m(0)},void 0,function(){var a=d[1][0];if(a)return l(0);else return 0},void 0,f,[h])):h)},function(){return[!1]},h[10],function(c,a){if(c)return b("bs_block").__(0,[[!1]]);else return b("bs_block").__(0,[[!0]])},h[12]]}a=b("ReasonReact.bs").wrapReasonForJs(h,function(a){return i(b("bs_js_primitive").nullable_to_opt(a.href),a.target,a.location,a.name,a.uid,a.isVerified,[])});f.component=h;f.make=i;f.jsComponent=a}),null); __d("TimeSpentRoomTypeEnum",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({GROUP:"GROUP",EVENT:"EVENT"})}),null); __d("TimeSpentRoomTypeEnum$FbtEnum",[],(function(a,b,c,d,e,f){"use strict";a=Object.freeze({GROUP:"Group",EVENT:"Event"});e.exports=a}),null); __d("MessengerContextBanner.react",["cx","fbt","Badge.react","CurrentUser","Image.react","ImageBlock.react","Link.react","MercuryParticipantsConstants","MercuryParticipantsImage.react","MercuryShareAttachmentRenderLocations","MercuryThreadImage.react","MessengerProfileLink.bs","MessengerTextWithEmoticons.react","React","TimeSpentRoomTypeEnum","TimeSpentRoomTypeEnum$FbtEnum","immutable","requireWeak"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("MessengerProfileLink.bs").jsComponent;a=b("React").PropTypes;var j;b("requireWeak")("MessengerThreadImageReact.bs",function(a){j=a.jsComponent});c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=b("React").createElement(b("ImageBlock.react"),{className:"_llj"+(this.props.location===b("MercuryShareAttachmentRenderLocations").MESSENGER?" _2eu-":"")+(this.props.location===b("MercuryShareAttachmentRenderLocations").CHAT?" _2eu_":""),spacing:"large",style:this.props.style},this.$1(),b("React").createElement("div",{className:"_lll"},this.$2(),this.$3(),this.$4())),c=this.props.associatedObject;c&&c.action_link&&(a=b("React").createElement(b("Link.react"),{href:c.action_link,target:"_blank",style:{textDecoration:"none"}},a));return a};d.$1=function(){var a=this.props.location===b("MercuryShareAttachmentRenderLocations").MESSENGER,c=this.props.associatedObject,d=null;if(!this.props.contactName&&c&&a)d=b("React").createElement(b("Image.react"),{className:"_4ld- _1wrc",src:c.profile_picture});else if(this.props.thread){c=j&&a?j:b("MercuryThreadImage.react");d=b("React").createElement(c,{showBadge:!1,participants:this.props.participants,size:a?60:null,thread:this.props.thread,viewer:this.props.viewer})}else this.props.participantIDs&&(d=b("React").createElement(b("MercuryParticipantsImage.react"),{participants:this.props.participantIDs,size:b("MercuryParticipantsConstants").BIG_IMAGE_SIZE}));return b("React").createElement("div",{className:"_llk"},d)};d.$2=function(){__p&&__p();if(this.props.location!==b("MercuryShareAttachmentRenderLocations").MESSENGER)return null;var a=this.props.isVerified?b("React").createElement(b("Badge.react"),{size:"medium",type:"verified"}):null,c=this.props.contactName;if(!c){var d=this.props.associatedObject;c=d?d.name:null}d=this.props.contactFBProfile;var e=this.props.contactID;return b("React").createElement("div",{className:"_llq"},b("React").createElement("span",{className:"_3oh-"},b("React").createElement(i,{href:d,location:"context_banner",name:c,uid:e}),a))};d.$3=function(){return b("React").createElement("div",{className:"_1n-e _36zg"},b("React").createElement(b("MessengerTextWithEmoticons.react"),{text:this.props.connectionContext||"",renderEmoticons:!1}))};d.$4=function(){__p&&__p();if(!this.props.contextItems.length){var a=this.props.associatedObject;if(a){a=b("TimeSpentRoomTypeEnum")[a.room_type];var c=b("CurrentUser").isWorkUser()?"Workplace":"Facebook";return b("React").createElement("div",{className:"_1n-e"},h._({"GROUP":"Go to {productName} Group","EVENT":"Go to {productName} Event"},[h._param("productName",c),h._enum(a,b("TimeSpentRoomTypeEnum$FbtEnum"))]))}return null}return b("React").createElement("div",null,this.props.contextItems.map(function(a,c){return b("React").createElement("div",{className:"_1n-e",key:"item:"+c},b("React").createElement(b("MessengerTextWithEmoticons.react"),{text:a||"",renderEmoticons:!1}))}))};return c}(b("React").PureComponent);c.propTypes={contactFBProfile:a.string,contactID:a.string,contactName:a.string,associatedObject:a.object,connectionContext:a.string,contextItems:a.arrayOf(a.string).isRequired,isVerified:a.bool,location:a.string.isRequired,participantIDs:a.arrayOf(a.string),participants:a.instanceOf(b("immutable").Map),thread:a.object,viewer:a.string.isRequired};e.exports=c}),null); __d("XMessengerContextBannerController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ajax/messenger/context_banner/",{profile_id:{type:"Int",required:!0},max_context_items:{type:"Int",defaultValue:3}})}),null); __d("MessengerContextInformationStore",["AsyncRequest","EventEmitter","TimeSlice","XMessengerContextBannerController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=new Map(),h=new Map();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;gg.top-f&&i.bottom0||!this.props.isLoading))&&b("EventProfiler").informManualInteractionTimestamp(["MessengerThredRow"],!0,"click")};d.render=function(){__p&&__p();var a=this,c;if(this.props.isLoading&&this.props.messages.isEmpty())return this.$26();var d=this.props.messages.last(),e=b("MercuryIDs").getParticipantIDFromUserID(this.props.viewer);this.$27(d);var f=this.$28(d),g=this.$29(d);this.$30(d);e=d&&d.author!==e?f||g:null;f=null;if(Array.isArray(e)){g=e.every(function(b){return b.content_type==="user_birthday"&&a.state.viewerBirthday===null||b.content_type==="user_email"&&a.state.viewerEmail===null||b.content_type==="user_phone_number"&&a.state.viewerPhone===null||b.content_type==="user_state"&&a.state.viewerState===null||b.content_type==="user_zip_code"&&a.state.viewerZipCode===null});if(!g){g=b("MessengerQuickReplyUtils").localizeTitleIfNecessary(e);f=b("React").createElement(b("BootloadOnRender.react"),{component:b("React").createElement(b("LazyComponent.react"),{options:g,threadID:d.thread_id,onVoiceClipCreate:this.props.onVoiceClipCreate,viewer:this.props.viewer,quickCamOriginLocation:b("MessengerQuickCamOrigins").MESSENGER,messageId:d.message_id,pageId:b("MercuryIDs").getUserIDFromParticipantID(d.author),isMessengerAdPreview:this.props.isMessengerAdPreview,isSponsored:d.is_sponsored,useM4QR:this.props.useM4QR,viewerBirthday:this.state.viewerBirthday,viewerEmail:this.state.viewerEmail,viewerPhone:this.state.viewerPhone,viewerState:this.state.viewerState,viewerZipCode:this.state.viewerZipCode}),loader:b("JSResource")("MessengerBotsQuickReplyButtonList.react").__setRef("MessengerConversation.react"),placeholder:b("React").createElement("div",null)})}}e=null;g=null;f&&(e=b("React").createElement("div",{className:"_51op"},b("React").createElement("div",{className:"_51oq",onResize:this.handleResize})),g=b("React").createElement("div",{ref:"quickReply",className:"_1mzb",onResize:this.handleResize},f));d=j._("Messages");f=j._("Load more...");var h=this.$31();return b("cr:1071079")!=null&&b("cr:1071080")!=null&&b("cr:1071080").shouldRenderChatNullState(this.props.messages,this.props.threadID,(c=this.props.contact)==null?void 0:c.user_type,this.props.viewer)?b("React").createElement(b("cr:1071079"),{messageType:b("nullthrows")(b("cr:1071080").getNullStateMessageType(this.props.threadID,this.props.viewer))}):b("React").createElement(b("React").Fragment,null,b("React").createElement(b("MessengerFlexScrollableArea.react"),{className:this.props.className,flexChildren:this.$32(),footerChildren:g,onMount:function(){return b("setImmediate")(a.$14)},onScroll:this.props.useManualFetch?void 0:this.$7,ref:"scrollable",shouldStickToBottom:!0,tabIndex:0,bottomOffset:this.props.bottomOffset},b("React").createElement("div",{"aria-label":d,className:b("joinClasses")("__i_"+(b("WorkChatRedesignedMessageListCheck.re").enabled?" _7w74":"")+(b("MessengerDotComAndInboxM4Check.bs").yes?" _7i2k":""),this.props.innerClassName),role:"region"},b("React").createElement("h3",{className:"accessible_elem"},d),this.$33(),this.props.useManualFetch&&!this.props.upExhausted?b("React").createElement("div",{className:"_7fim"},b("React").createElement(l,{className:"_41jf",label:f,onClick:function(){return a.props.fetchMessages(b("WebMessengerConstants").MORE_SEARCH_CONTEXT_UP)},type:"primary",use:"default"})):null,this.$34(),this.$35()&&b("React").createElement(b("FantaPageGreetingLoader.react"),{thread:this.props.thread,threadID:this.props.threadID}),h||b("React").createElement(b("MessageList.react"),{DateBreak:b("MessengerDateBreak.react"),deliveryTimestamp:this.props.deliveryTimestamp,isCanonical:this.props.isCanonical,LogMessage:b("MessengerBootloadedLogMessage.react"),CollapsedLogMessageGroup:b("MessengerCollapsedLogMessageGroup.react"),MessageGroup:b("MessengerMessageGroup.react"),messages:this.props.messages,onAttachmentLoad:this.$36(this.props.threadID),onReplyToMessage:this.props.onReplyToMessage,readReceipts:this.state.readReceipts,ref:"messageList",location:b("MercuryShareAttachmentRenderLocations").MESSENGER,viewer:this.props.viewer,thread:this.props.thread,scrollToRepliedMessage:this.$37}),this.props.useManualFetch&&!this.props.downExhausted?b("React").createElement("div",{className:"_7fim"},b("React").createElement(l,{className:"_41jf",label:f,onClick:function(){return a.props.fetchMessages(b("WebMessengerConstants").MORE_SEARCH_CONTEXT_DOWN)},type:"primary",use:"default"})):null,e,b("React").createElement(k,{indicatorClass:n,indicatorsDidShow:function(){a.trackBottomIfRequired()},rootClassName:"clearfix _17pz",threadID:this.props.threadID,viewer:this.props.viewer}),b("gkx")("678591")&&b("React").createElement(b("ErrorBoundary.react"),{project:"omnim"},b("React").createElement(b("BootloadOnRender.react"),{loader:b("JSResource")("OmniMSuggestionsContainer.react").__setRef("MessengerConversation.react"),placeholder:b("React").createElement("div",null),component:b("React").createElement(b("LazyComponent.react"),{threadID:this.props.threadID,trackBottom:function(){return a.trackBottomIfRequired()}})})))),this.$38())};d.$31=function(){if(!b("CurrentUser").isWorkUser())return null;if(!this.$39())return null;if(this.state.isLandingPageDismissed===!0)return null;return this.props.contact&&o(this.props.messages)?b("React").createElement(b("React").Suspense,{fallback:b("React").createElement(b("MessengerSpinner.react"),null)},b("React").createElement(v,{contact:this.props.contact,threadID:this.props.threadID,onDismiss:this.$40})):null};d.$38=function(){var a=this.$18();if(a){a=a.getElement().getBoundingClientRect().height;a=a-74;a+="px";a={top:a}}else a={bottom:"15%"};return this.props.useManualFetch&&!this.props.isSearchResult||this.state.renderScrollToBottom?b("React").createElement(b("Link.react"),{style:a,className:"_69xg",onClick:this.$41},b("React").createElement(b("Image.react"),{className:"_69xi",src:g("415099")})):null};d.$28=function(a){var b=null;a=a&&a.platform_xmd&&JSON.parse(a.platform_xmd);var c=a&&a.message_classification==="ad_message";c&&Array.isArray(a&&a.quick_replies)&&(b=a&&a.quick_replies);return b};d.$29=function(a){a=a&&a.platform_xmd&&JSON.parse(a.platform_xmd);return Array.isArray(a&&a.quick_replies)?a&&a.quick_replies:null};d.$42=function(a){a=a&&a.platform_xmd&&JSON.parse(a.platform_xmd);return a&&a.user_input};d.$27=function(a){__p&&__p();var c=b("gkx")("964442");if(c){c=this.$42(a);if(!c){b("MessengerUserInputActionsHandler").updateUserInputRequested(!1,p);return}else c.type==="address_auto_complete"&&b("MessengerUserInputActionsHandler").updateUserInputRequested(!0,c.data.num_results,c.type)}return};d.$13=function(){if(this.props.useManualFetch)return;var a=this.$18();a&&a.getScrollTop()a.size?null:a.get(a.size-b)};d.$25=function(a){__p&&__p();var b=this,c=this.props.messages,d=this.$46();if(!d)return!1;var e=a.getElement().getBoundingClientRect();return c.filter(function(a){return a&&a.timestamp<=d.timestamp}).some(function(a){a=b.refs.messageList.getMessageElement(a.message_id);if(!a)return!1;a=a.getBoundingClientRect();return a.bottom>e.top&&a.top0;a={isActive:a,size:f,thread:h,viewer:i};c!==void 0&&(a.borderColor=b("bs_js_primitive").valFromOption(c));d!==void 0&&(a.className=b("bs_js_primitive").valFromOption(d));e!==void 0&&(a.expanded=b("bs_js_primitive").valFromOption(e));g!==void 0&&(a.storiesRingEligible=b("bs_js_primitive").valFromOption(g));return b("React").createElement(b("MessengerThreadImageM4React.bs").make,a)};return b("React").createElement(b("MessengerPresenceProvider.bs").make,{subscribeToIDs:b("bs_belt_Set").fromArray(h.participants,[b("ParticipantId.bs").cmp]),children:a})}c=a;f.make=c}),null); __d("MessengerRTCUnavailableDialog.react",["fbt","MessengerDialog.react","MessengerDialogBodyReact.bs","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeaderReact.re","MessengerDialogs.bs","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MessengerDialogBodyReact.bs").jsComponent,i=b("MessengerDialogHeaderReact.re").make;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("MessengerDialog.react"),{onToggle:this.$1},b("React").createElement(i,null,g._("Can't Make Call")),b("React").createElement(h,null,this.$2()),b("React").createElement(b("MessengerDialogFooter.react"),null,b("React").createElement(b("MessengerDialogButton.react"),{action:"cancel",label:g._("OK"),type:"primary"})))};d.$2=function(){return b("React").createElement("div",null,g._("{name} is not available right now.",[g._param("name",this.props.name)]))};d.$1=function(a){a||b("MessengerDialogs.bs").removeDialog()};return c}(b("React").Component);c.propTypes={name:a.string.isRequired};e.exports=c}),null); __d("MessengerRTCGroupCallUnsupportedBrowserDialog.react",["fbt","CurrentUser","Link.react","MessengerDialog.react","MessengerDialogBodyReact.bs","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeaderReact.re","React","XWorkplaceMarketingDefaultController"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MessengerDialogBodyReact.bs").jsComponent,i=b("MessengerDialogHeaderReact.re").make;a=function(a){var c=a.browserName,d=a.hasVideo,e=a.onUnmount;a=a.hideDialog;return b("React").createElement(b("MessengerDialog.react"),{onToggle:e},b("React").createElement(i,null,j(d)),b("React").createElement(h,null,k(c,d,a)),b("React").createElement(b("MessengerDialogFooter.react"),null,b("React").createElement(b("MessengerDialogButton.react"),{label:g._("OK"),onClick:a,type:"primary"})))};function j(a){return a?g._("Switch Browsers to Make Group Video Chats"):g._("Switch Browsers to Make Group Calls")}function k(a,c,d){return b("CurrentUser").isWorkUser()?g._({"video call":"Unfortunately, our Workplace Chat group calling feature doesn't support {browser name, i.e. Internet Explorer or Safari} yet. To make a group video call, open in {link to install chrome} or the {link to install Workplace chat desktop} app.","call":"Unfortunately, our Workplace Chat group calling feature doesn't support {browser name, i.e. Internet Explorer or Safari} yet. To make a group call, open in {link to install chrome} or the {link to install Workplace chat desktop} app."},[g._param("browser name, i.e. Internet Explorer or Safari",a),g._enum(c?"video call":"call",{"video call":"video call",call:"call"}),g._param("link to install chrome",l(d)),g._param("link to install Workplace chat desktop",m(d))]):g._({"video call":"Unfortunately, our group calling feature doesn't support {browser name, i.e. Internet Explorer or Safari} yet. To make a group video call, open in {link to install chrome}.","call":"Unfortunately, our group calling feature doesn't support {browser name, i.e. Internet Explorer or Safari} yet. To make a group call, open in {link to install chrome}."},[g._param("browser name, i.e. Internet Explorer or Safari",a),g._enum(c?"video call":"call",{"video call":"video call",call:"call"}),g._param("link to install chrome",l(d))])}function l(a){return b("React").createElement(b("Link.react"),{onClick:a,href:"https://www.google.com/chrome/index.html",target:"_blank"},"Google Chrome")}function m(a){var c=b("XWorkplaceMarketingDefaultController").getURIBuilder().setString("path","chat-app").setString("ref","rtc_unsupported_dialog").getURI();return b("React").createElement(b("Link.react"),{onClick:a,href:c,target:"_blank"},"Workplace Chat")}e.exports=a}),null); __d("MessengerRTCUnsupportedBrowserDialog.react",["cx","fbt","CurrentUser","FBRTCConfig","Link.react","MessengerDialog.react","MessengerDialogBodyReact.bs","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeaderReact.re","React","XWorkplaceMarketingDefaultController"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("MessengerDialogBodyReact.bs").jsComponent,j=b("MessengerDialogHeaderReact.re").make;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.props,c=a.browserName,d=a.hasVideo,e=a.onUnmount;a=a.hideDialog;return b("React").createElement(b("MessengerDialog.react"),{onToggle:e},b("React").createElement(j,null,h._("Switch Browsers to Make Calls")),b("React").createElement(i,null,this.$1(c,d)),b("React").createElement(b("MessengerDialogFooter.react"),null,b("React").createElement("span",{className:"_30vt"},b("React").createElement(b("MessengerDialogButton.react"),{label:h._("Learn More"),onClick:a,type:"secondary",href:b("FBRTCConfig").unsupportedBrowserUrl(),target:"_blank",use:"default"})),b("React").createElement(b("MessengerDialogButton.react"),{label:h._("OK"),onClick:a,type:"primary",use:"default"})))};d.$1=function(a,c){if(b("CurrentUser").isWorkUser())return h._({"video calling":"Unfortunately, {browser name, i.e. Internet Explorer or Safari} doesn't support our video calling feature yet. To make a call, open Workplace Chat in {link to install chrome}, {link to install firefox} or the {link to install Workplace chat desktop} app.","calling":"Unfortunately, {browser name, i.e. Internet Explorer or Safari} doesn't support our calling feature yet. To make a call, open Workplace Chat in {link to install chrome}, {link to install firefox} or the {link to install Workplace chat desktop} app."},[h._param("browser name, i.e. Internet Explorer or Safari",a),h._enum(c?"video calling":"calling",{"video calling":"video calling",calling:"calling"}),h._param("link to install chrome",this.$2()),h._param("link to install firefox",this.$3()),h._param("link to install Workplace chat desktop",this.$4())]);else return h._({"video calling":"Unfortunately, {browser name, i.e. Internet Explorer or Safari} doesn't support our video calling feature yet. To make a call, open Messenger in {link to install chrome} or {link to install firefox}.","calling":"Unfortunately, {browser name, i.e. Internet Explorer or Safari} doesn't support our calling feature yet. To make a call, open Messenger in {link to install chrome} or {link to install firefox}."},[h._param("browser name, i.e. Internet Explorer or Safari",a),h._enum(c?"video calling":"calling",{"video calling":"video calling",calling:"calling"}),h._param("link to install chrome",this.$2()),h._param("link to install firefox",this.$3())])};d.$2=function(){return b("React").createElement(b("Link.react"),{onClick:this.props.hideDialog,href:"https://www.google.com/chrome/index.html",target:"_blank"},"Google Chrome")};d.$3=function(){return b("React").createElement(b("Link.react"),{onClick:this.props.hideDialog,href:"https://www.mozilla.org/en-US/firefox/new/",target:"_blank"},"Mozilla Firefox")};d.$4=function(){var a=b("XWorkplaceMarketingDefaultController").getURIBuilder().setString("path","chat-app").setString("ref","rtc_unsupported_dialog").getURI();return b("React").createElement(b("Link.react"),{onClick:this.props.hideDialog,href:a,target:"_blank"},"Workplace Chat")};return c}(b("React").Component);e.exports=a}),null); __d("MessengerRTCUnsupportedBrowserDialogController",["fbt","MessengerDialogs.bs","MessengerRTCGroupCallUnsupportedBrowserDialog.react","MessengerRTCUnsupportedBrowserDialog.react","React","UserAgent"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a={_dialog:null,_handleToggle:function(a){a||b("MessengerDialogs.bs").removeAllDialogs()},hideDialog:function(){b("MessengerDialogs.bs").removeAllDialogs()},_browserName:function(){if(b("UserAgent").isBrowser("Firefox"))return g._("Firefox");else if(b("UserAgent").isBrowser("IE"))return g._("Internet Explorer");else if(b("UserAgent").isBrowser("Safari"))return g._("Safari");else return g._("your browser")},render:function(a){var c=this,d=a.hasVideo,e=a.isGroupCall;b("MessengerDialogs.bs").showDialog(function(){return e?b("React").createElement(b("MessengerRTCGroupCallUnsupportedBrowserDialog.react"),{browserName:c._browserName(),hasVideo:d,hideDialog:c.hideDialog,onUnmount:c._handleToggle}):b("React").createElement(b("MessengerRTCUnsupportedBrowserDialog.react"),{browserName:c._browserName(),hasVideo:d,hideDialog:c.hideDialog,onUnmount:c._handleToggle})})},dismiss:b("MessengerDialogs.bs").removeAllDialogs};e.exports=a}),null); __d("MessengerRTCInvokeHandler",["invariant","MercuryIDs","MercuryThreadIDMap","MessengerDialogs.bs","MessengerRTCUnavailableDialog.react","MNRTCCallabilityStore","React","FBRTCLogger","RTWebUserActionLogger","nullthrows","qex"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("MercuryThreadIDMap").get(),i=b("FBRTCLogger").Trigger;a={isCallable:function(a,c){var d;if(b("MercuryIDs").isGroupChat(a))d=!0;else{a=b("MercuryIDs").getUserIDFromThreadID(a);d=a!=null?b("MNRTCCallabilityStore").isCallable(a,c):!1}return d},handleStartCall:function(a,c,e,f,k,l,m){__p&&__p();m?b("MercuryIDs").isGroupChat(a)?(b("RTWebUserActionLogger").logPreCallClick({conferenceName:c.thread_fbid!=null?"GROUP:"+c.thread_fbid:null,surface:"messenger_header",component:b("RTWebUserActionLogger").getAudioVideoComponent(!e),callType:"mw",mediaType:b("RTWebUserActionLogger").getMediaType(!e)}),d(["FBRTCCore","FBRTCSupport","MessengerRTCUnsupportedBrowserDialogController","MessengerRTCGroupCallParticipantsPickerDialogController"],function(d,g,l,m){__p&&__p();var n=c.rtc_call_data,o=b("MercuryIDs").isGroupChat(a)&&k.size===1;if(n&&(n.call_state!=="NO_ONGOING_CALL"&&n.server_info_data||o)){d.startGroupCall({conferenceName:"GROUP:"+b("nullthrows")(c.thread_fbid),hasVideo:e,serverInfoData:n.server_info_data,trigger:o?e?i.MULTIWAY_THREAD_HEADER_VIDEO_BUTTON:i.MULTIWAY_THREAD_HEADER_AUDIO_BUTTON:n.call_state!=="AUDIO_GROUP_CALL"?e?i.MULTIWAY_THREAD_HEADER_JOIN_AUDIO_CALL_VIDEO_BUTTON:i.MULTIWAY_THREAD_HEADER_JOIN_AUDIO_CALL_AUDIO_BUTTON:e?i.MULTIWAY_THREAD_HEADER_JOIN_VIDEO_CALL_VIDEO_BUTTON:i.MULTIWAY_THREAD_HEADER_JOIN_VIDEO_CALL_AUDIO_BUTTON});return}if(!g.isGroupCallWebtrcSupported()){j(a,c,e);l.render({hasVideo:e,isGroupCall:!0});return}if(k.size>0){o=b("qex")._("1006758")||0;n=k.filter(function(a){a=a.fbid;return a!==f}).toArray().map(function(a){a=a.fbid;return a});if(n.length1||f.thread_type===b("MessagingThreadType").GROUP)&&b("MercuryThreadInfo").canReply(f)&&!b("MessageRequestUtils").isMessageRequest(f)}else f=!1;c=c!==void 0?b("bs_js_primitive").valFromOption(c).thread_type===b("MessagingThreadType").MARKETPLACE:!1;if(d&&!a&&!e&&f)return!c;else return!1}var t=b("MessengerDotComAndInboxM4Check.bs").yes?"_17w2 _6ybr":"_17w2",u=b("MessengerDotComAndInboxM4Check.bs").yes?"_5743 _6y4y":"_5743",v=b("MessengerDotComAndInboxM4Check.bs").yes?"_fl2 _6ymr":"_fl2",w=b("ReasonReact.bs").reducerComponent("MessengerDetailViewHeaderReact");function x(a,c,d,e,f,g,o,x,y){__p&&__p();var z;if(g!==void 0){y=b("bs_js_primitive").valFromOption(g);if(b("MessengerDotComAndInboxM4Check.bs").yes){var A=y.gradient_colors;z=A.length!==0?A[0]:b("MessengerCustomColorUtils.bs").customColorOrBlue(y)}else z=b("MessengerCustomColorUtils.bs").customColorOrBlue(y)}else z=b("MessengerCustomColorUtils.bs").defaultColor(0);var B=function(c){if(s(a,g)&&g!==void 0){var d=b("bs_js_primitive").valFromOption(g),e=d.thread_id;return b("React").createElement("li",void 0,b("ReasonReact.bs").element(void 0,void 0,b("MessengerRTCCallButtonReact.bs").make("_30yy",z,!1,f,d,e,c,a!==void 0?b("bs_js_primitive").valFromOption(a).contact.name:"",[])))}else return null},C=function(c){__p&&__p();if(s(a,g)&&g!==void 0){var d=b("bs_js_primitive").valFromOption(g),e=d.thread_id;if(a!==void 0){var h=b("bs_js_primitive").valFromOption(a).isUserActive;h=h?"_3qfl":""}else h="";return b("React").createElement("li",void 0,b("ReasonReact.bs").element(void 0,void 0,b("MessengerRTCCallButtonReact.bs").make("_30yy",z,!0,f,d,e,c,a!==void 0?b("bs_js_primitive").valFromOption(a).contact.name:"",[])),b("React").createElement("div",{className:h}))}else return null};if(a!==void 0){A=b("bs_js_primitive").valFromOption(a).availabilityStatusData;y=A==null?[!1,""]:[A.isDoNotDisturb,A.description]}else y=[!1,""];var D=y[1],E=y[0],F=a!==void 0?!b("WorkForeignEntityInfo.bs").isCoworker(b("bs_js_primitive").valFromOption(a).contact):!1,G=function(){var a=b("gkx")("678573");if(a)return b("ReasonReact.bs").element(void 0,void 0,b("WorkChatDoNotDisturbStatusReact.bs").make("_6f6k",b("bs_js_null_undefined").fromOption(g),E,D,[]));else return null},H=function(){if(a!==void 0){var c=b("bs_js_primitive").valFromOption(a),d={className:"_2v6o",isUserActive:c.isUserActive},e=b("bs_js_primitive").nullable_to_opt(c.lastActive);e!==void 0&&(d.lastActive=b("bs_js_primitive").valFromOption(e));e=b("bs_js_primitive").nullable_to_opt(c.platform);e!==void 0&&(d.platform=b("bs_js_primitive").valFromOption(e));return[!0,b("React").createElement(b("MessengerPresenceStatusReact.bs").make,d)]}else return[!1,null]},I=function(){if(!b("CurrentUser").isWorkUser()||!F||a===void 0)return[!1,null];else{var c=b("bs_js_primitive").valFromOption(a),d=c.contact.company_name;if(d==null)return[!1,null];else return[!0,b("React").createElement(b("MessengerForeignUserCompanyNameReact.bs").make,{className:"_6krh",companyName:b("bs_js_primitive").nullable_to_opt(c.contact.company_name)})]}};return[w[0],w[1],w[2],w[3],function(a){__p&&__p();if(!b("MessengerDotComAndInboxM4Check.bs").yes){var c=b("Event").listen(window,"resize",b("debounce")(function(){return j(a[1])},20));b("bs_curry")._1(a[4],function(){return c.remove()})}return b("bs_curry")._1(i[0],function(b){var c=a;b=b;c[1][5][0]=b;return 0})},function(a){if(b("MessengerDotComAndInboxM4Check.bs").yes)return 0;else return j(a[1][1])},w[6],w[7],function(i){__p&&__p();if(o!==void 0&&g!==void 0){var j=b("bs_js_primitive").valFromOption(g),s=b("bs_js_primitive").valFromOption(o),w=h._("Conversation Information"),y=H(0),A=y[0],D=I(0),J=G(0);if(b("MessengerDotComAndInboxM4Check.bs").yes){var K=j.has_montage&&b("MercuryConfig").MontageThreadViewer&&b("gkx")("686397")&&b("gkx")("972782")&&b("gkx")("995308");K=b("gkx")("863504")?b("React").createElement(b("MessengerProfilePresenceReact.bs").make,{className:"_6ynm",size:40,storiesRingEligible:K,thread:j,viewer:s}):b("React").createElement(b("MessengerThreadImageM4React.bs").make,{className:"_6ynm",size:40,storiesRingEligible:K,thread:j,viewer:s})}else K=null;return b("React").createElement("div",{ref:b("bs_curry")._1(i[0],m),className:"_673w"+(b("MessengerDotComAndInboxM4Check.bs").yes?" _6ynl":"")+(!D[0]&&(!A||E)?" _1_fz":"")},p(j,x,f,i),b("React").createElement("div",{key:"threadTitle",ref:b("bs_curry")._1(i[0],l),className:u},K,b("React").createElement("div",{className:b("MessengerDotComAndInboxM4Check.bs").yes?"_6ynn":""},b("React").createElement("h2",{className:t,id:b("MessengerDomIDs.bs").ids.THREAD_TITLE},J,b("ReasonReact.bs").element(void 0,b("bs_curry")._1(i[0],k),b("MercuryThreadTitleReact.bs").make("_3oh-",b("bs_belt_Option").getWithDefault(d,0),j,s,void 0,void 0,void 0,void 0,[]))),E||!A||b("CurrentUser").isWorkUser()&&F?null:y[1],r(s,f),D[1])),b("React").createElement("ul",{key:"buttonsContainer",ref:b("bs_curry")._1(i[0],n),className:v},q(a,j,s,i),B(s),C(s),b("React").createElement("li",void 0,b("React").cloneElement(b("ReasonReact.bs").element(void 0,void 0,b("LinkReact.bs").make(!c,void 0,w,"_30yy",void 0,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,"button",void 0,void 0,void 0,void 0,w,[])),{"data-testid":b("MessengerWebDriverTestIDs").INFO_PANEL_BUTTON},b("MessengerDotComAndInboxM4Check.bs").yes?c?b("React").createElement("div",{className:"_6yms"},b("MessengerInfoIconSVGM4React.bs").make(z)):b("React").createElement("div",{className:"_6yms"},b("React").createElement("div",{className:"_6y4z",style:{backgroundColor:z}}),b("MessengerInfoIconSVGM4React.bs").make(z)):b("MessengerInfoPanelButtonReact.bs").make(z,c)),b("React").createElement("div",{"aria-owns":b("MessengerDomIDs.bs").ids.THREAD_INFO_PANEL}))))}else return null},function(){return[[void 0],[void 0],[void 0],[void 0],[void 0],[void 0]]},w[10],function(a,b){return 0},w[12]]}d=b("ReasonReact.bs").wrapReasonForJs(w,function(a){return x(b("bs_js_primitive").nullable_to_opt(a.contactData),a.infoPanelCollapsed,b("bs_js_primitive").nullable_to_opt(a.maxTitle),a.onInfoPanelToggle,a.participants,b("bs_js_primitive").nullable_to_opt(a.thread),b("FBID.bs").ofString(a.viewer),a.montageData,[])});f.BootloadableMessengerUserControlsButtonReact=c;f.LoadableMessengerUserControlsButtonReact=i;f.calculateTruncationState=j;f.findMercuryTitle=k;f.findTitle=l;f.findRoot=m;f.findButtons=n;f.findMontage=o;f.renderMontageThread=p;f.renderUserControls=q;f.renderLocalTime=r;f.shouldShowCallButton=s;f.titleElemClasses=t;f.titleClasses=u;f.buttonsContainerClasses=v;f.component=w;f.make=x;f.jsComponent=d}),null);